﻿using MB.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WoChu.Infrastructure.Log;

namespace WoChu.WMS.Web.Common
{
    public class LogUntity:ILog
    {
        public void LogInfo(string title, string messge)
        {
            TraceEx.Write(string.Format("{0} {1}", title, messge), APPMessageType.CodeRunInfo);
        }

        public void LogWan(string title, string messge)
        {
            TraceEx.Write(string.Format("{0} {1}", title, messge), APPMessageType.SysWarning);
        }

        public void LogError(string title, string messge)
        {
            TraceEx.Write(string.Format("{0} {1}", title, messge), APPMessageType.SysErrInfo);
        }

        public void LogError(Exception ex, string title = "")
        {
            TraceEx.Write(string.Format("{0} {1}", title, ex.ToString()), APPMessageType.SysErrInfo);
        }
    }
}